<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>dropdownlist</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

    <meta name="author" content="http://www.huayingsoft.com/" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=8,IE=9,IE=10" />
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Cache-Control" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store">

    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/from/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="../../css/from/bootstrap-select.css">
    <link rel="stylesheet" href="../../css/bootstrapEx.css">

    <script src="../../js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../../js/from/global.js"></script>
    <script type="text/javascript" src="../../js/from/jquery.smart-form.js"></script>
    <script type="text/javascript" src="../../js/from/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="../../js/from/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script type="text/javascript" src="../../js/from/bootstrap-select.js" charset="UTF-8"></script>
    <script type="text/javascript" src="../../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../js/bootstrapEx2.0.js"></script>
</head>
<body style="overflow-x: hidden">
        <p/>
        <form action="" id="itemForm1"></form>
</body>
<script>
    var form1//表单
    var userdata = [];//测试数据
    var depdata = [];//测试数据
    var Modal1;
    $(document).ready(function () {
        //绘制表单
        //$("#btn7").click(function () {
            InitForm1();
        //})
        
    });
    
    //绘制表单
    function InitForm1() {
        //清空
        $('#itemForm1').html('');
        form1 = new bsEx.ItemForm('#itemForm1');
        form1.items = [
            { type: 'select', name: 'taskMakeuser1', title: '单选正常显示', select: { data: userdata, tree: false,noneSelectedText:"请选择用户" } },
            { type: 'select', name: 'taskMakedep2', title: '单选树级显示', select: { data: depdata, tree: true } },
            { type: 'select', name: 'taskMakedep3', title: '多选正常显示', select: { data: userdata, tree: false,multiple:true } },
            { type: 'select', name: 'taskMakedep4', title: '多选树级显示', select: { data: depdata, tree: true,multiple:true } },
            { type: 'select', name: 'taskMakedep5', title: '多选树级显示自动勾选子集', select: { data: depdata, tree: true,multiple:true ,treelevel:true} }
        ];//项
        form1.colunb = 4;//列数
        form1.init();//开始显示
    }
    //得到测试数据
    (function gettestdata() {
        $.ajax({
            url: "../../Data/fromtest_user.json",//json文件位置
            type: "GET",//请求方式为get
            dataType: "json", //返回数据格式为json
            async: false,
            success: function (data) {//请求成功完成后要执行的方法 
                userdata = data;
            }
        })
        $.ajax({
            url: "../../Data/fromtest_dep.json",//json文件位置
            type: "GET",//请求方式为get
            dataType: "json", //返回数据格式为json
            async: false,
            success: function (data) {//请求成功完成后要执行的方法 
                depdata = data;
            }
        })
    })();
</script>
</html>